package com.ruoyi.project.comp.file.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.comp.file.mapper.CompWorkFileMapper;
import com.ruoyi.project.comp.file.domain.CompWorkFile;
import com.ruoyi.project.comp.file.service.ICompWorkFileService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 作品文件Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-02
 */
@Service
public class CompWorkFileServiceImpl implements ICompWorkFileService 
{
    @Autowired
    private CompWorkFileMapper compWorkFileMapper;

    /**
     * 查询作品文件
     * 
     * @param id 作品文件主键
     * @return 作品文件
     */
    @Override
    public CompWorkFile selectCompWorkFileById(Long id)
    {
        return compWorkFileMapper.selectCompWorkFileById(id);
    }

    /**
     * 查询作品文件列表
     * 
     * @param compWorkFile 作品文件
     * @return 作品文件
     */
    @Override
    public List<CompWorkFile> selectCompWorkFileList(CompWorkFile compWorkFile)
    {
        return compWorkFileMapper.selectCompWorkFileList(compWorkFile);
    }

    /**
     * 新增作品文件
     * 
     * @param compWorkFile 作品文件
     * @return 结果
     */
    @Override
    public int insertCompWorkFile(CompWorkFile compWorkFile)
    {
        return compWorkFileMapper.insertCompWorkFile(compWorkFile);
    }

    /**
     * 修改作品文件
     * 
     * @param compWorkFile 作品文件
     * @return 结果
     */
    @Override
    public int updateCompWorkFile(CompWorkFile compWorkFile)
    {
        return compWorkFileMapper.updateCompWorkFile(compWorkFile);
    }

    /**
     * 批量删除作品文件
     * 
     * @param ids 需要删除的作品文件主键
     * @return 结果
     */
    @Override
    public int deleteCompWorkFileByIds(String ids)
    {
        return compWorkFileMapper.deleteCompWorkFileByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除作品文件信息
     * 
     * @param id 作品文件主键
     * @return 结果
     */
    @Override
    public int deleteCompWorkFileById(Long id)
    {
        return compWorkFileMapper.deleteCompWorkFileById(id);
    }
}
